package jmine.tec.datadigester.positional.meta.factory;

import java.beans.PropertyDescriptor;

import jmine.tec.datadigester.positional.annotations.PositionalIntEntry;
import jmine.tec.datadigester.positional.meta.PositionalFieldMetadata;
import jmine.tec.datadigester.positional.meta.PositionalIntFieldMetadata;

/**
 * {@link PositionalFieldAnnotationSupport} para writers de campos Int
 * 
 * @author israel.crisanto
 */
public class PositionalIntAnnotationSupport implements PositionalFieldAnnotationSupport<PositionalIntEntry> {

    /**
     * {@inheritDoc}
     */
    public PositionalFieldMetadata create(PropertyDescriptor property, PositionalIntEntry a) {
        return new PositionalIntFieldMetadata(property, a.description(), a.start(), a.size());
    }

    /**
     * {@inheritDoc}
     */
    public Class<PositionalIntEntry> annotationClass() {
        return PositionalIntEntry.class;
    }
}
